Dual circuit wall switch occupancy sensor and method of operating same

ABSTRACT

A method and apparatus are provided for detecting occupancy in an area using multiple detection technologies (e.g., ultrasound and infrared sensing) to intelligently control switching of plural load circuits whereby one of the circuits is affected by photocell control. A programmable controller implements auto-on, manual-on, reversion to auto-on and override operations with respect to the separately controlled load circuits based on sensor outputs and user inputs. An improved power supply for an occupancy sensor and load control device employs a DC voltage derived from leakage AC voltage between line and ground to drive the sensors and other circuits, and a switching regulator with a switching cycle controlled by a pulse width modulated (PWM) subsystem of the apparatus, allowing synchronous, delayed or exclusive operation relative to the sensing technology such as the US transmitter.

This application is a continuation of pending U.S. patent applicationSer. No. 11/138,084, filed May 27, 2005, the subject matter of which ishereby incorporated by reference.

CROSS-REFERENCE TO RELATED APPLICATIONS

Related subject matter is disclosed in U.S. Pat. No. D535,204 of R. KurtBender et al.; and in US-2006-0266949-A1 of R. Kurt Bender et al.; theentire contents of each of these applications being expresslyincorporated herein by reference.

FIELD OF THE INVENTION

The present invention relates generally to occupancy sensors, and moreparticularly to an occupancy sensor and load control device fordetecting occupancy in an area using multiple detection technologiessuch as ultrasound (US) and passive infrared (PIR) sensing tointelligently control switching of plural loads. Further, the presentinvention relates to an improved power supply for use with an occupancysensor and load control device that employs a DC voltage derived fromleakage AC voltage between line and ground to drive the sensors andother circuits, and a buck-type switching regulator with a switchingcycle controlled by a pulse width modulated (PWM) subsystem of the UStransmitter.

BACKGROUND OF THE INVENTION

An occupancy sensor is designed to detect the presence of a person(s) ina room, usually in order to determine whether various electricallypowered loads in that room (e.g., lights, ventilation, and the like)should be turned on or not. This is of particular advantage toinstitutions that have occupants who are not directly responsible forpaying for the electricity they consume, since these people often do notexercise diligence in regularly turning off electrically powered loadssuch as lights, ventilation, and the like, when they leave a room.Occupancy sensors may therefore provide a means to conserve asignificant amount of energy. This has led many businesses to purchaseoccupancy sensors voluntarily. This potential for energy savings hasalso resulted in laws being passed in certain states that mandate theuse of occupancy sensors in large areas as an environmental conservationmeasure.

Some state and local energy conservation/building codes requireinstallation of two light switches in the construction or reconstructionof offices, each to control a different portion of the overheadlighting. The reasoning behind such a requirement is that, in theinterest of energy conservation, employees and janitorial personnel havethe opportunity to use approximately one half of the light they wouldnormally require in their day-to-day activities. Depending upon theamount of ambient light available, employees working in a room mayselect to use only one half of the available bank or banks of lights.

Further, employees may customize their specific lighting needs to theiractivities and location in the room. For example, employees working inan area not receiving sufficient ambient light may require moreartificial light, depending upon their specific activities. Similarly,employees located in an area receiving sufficient ambient light mayrequire less artificial light. Utilizing office lighting effectively(e.g., using only one-half of the available lighting, and using lightingonly in occupied offices) results in substantial energy savings. Inaddition, for computer applications, it is advantageous to reduce thelevel of light to eliminate the glare on cathode ray tubes (CRT).

Conventional manual switches are inefficient because they depend uponhuman judgment to turn all or only a portion of the lights on and off.Existing automatic wall switches are more efficient, but still makeerrors, and have less than optimal sensitivity.

Commercially available occupancy sensors and load control units havebeen designed to replace existing wall switches in commercial andprivate applications. These units typically include load switchingdevices that replace the mechanical switch contacts found in amanually-operated switch. These load switching devices may includerelays, SCRs, Triacs, transistors, or other electrical load switchingdevices that may be controlled by power control circuitry including, forexample, a programmable controller, or the like. Many of thesereplacement units require a power supply for the power control circuitrythat must supply power to the control circuitry whether or not the loadswitching device is in the on-state or the off-state. The wiring thatexists in the existing switch enclosures, the mechanical constraintsimposed by the existing switch enclosures, and the constraints presentedby the existing loads cannot be easily altered and must be tolerated bythe unit that is replacing the existing switch.

Units that have been designed as replacement devices for existingswitches range from simple dimmer switches to intelligent lightingsystems with microprocessor control. Commercially viable replacementunits for business or residential locations are preferably low cost,robust, small in size, meet stringent safety considerations, as well ashave low electrical power dissipation, and attractive physical features.In addition, the replacement unit's contacts preferably emulate thesimple mechanical air gap switch it replaced. The replacement unitshould also have a similar voltage drop when the contacts are closed,essentially zero leakage current through the contacts when the contactsare open, and guarantee safety from hazardous voltages when the contactsare open. Underwriters Laboratories (UL), the National ElectricalManufacturers Association (NEMA), the National Electrical Code (NEC),and other electrical safety organizations and documents, generally agreethat 0.5 milliamperes (mA) of electrical current may pass through thehuman body without creating hazard of electrical shock. This currentlevel has been established as a safety standard for electrical currentleakage that may incidentally occur in an electrical device. Variousmanufacturers of automatic wall switch type devices have utilized thisallowable leakage current as a power source for the device.

A number of load control devices and/or power supplies for use with loadcontrol devices are described in commonly-assigned U.S. Pat. Nos.5,821,642, 6,307,354, 6,466,826 and 6,472,853 to Nishihira et al, U.S.Pat. No. 5,774,322 to Walter et al, U.S. Pat. Nos. 5,777,837 and5,856,905 to Eckel et al, and U.S. Pat. No. 6,262,565 to Williams et al,which are each hereby incorporated herein by reference. U.S. Pat. No.6,262,565, to Williams et al, provides a power system for an electricalload switch that replaces the simple mechanical contacts of a wallswitch with those elements necessary to power control circuitry, providecontrollable contacts, ensure thermal stability in a wall switchenclosure, control the off-state leakage current to ensure safe androbust operation of sensitive loads, and provide a safety device toguarantee that a no leakage off-state exists to protect a maintenanceperson from voltage potential with respect to neutral during loadreplacement. As with many power systems used with existing occupancysensors, however, the power system disclosed in U.S. Pat. No. 6,262,565employs a power supply in series with the load. This is oftenadvantageous in retrofit situations where the sensor power supply andrelay are connected into existing lighting circuits in the mostexpedient way, as a replacement for the manual wall switch in theportion of the circuit already switched at the wall.

These types of power supplies are disadvantageous because they allow asmall amount of current to flow in the load in off state, and thatcurrent may cause malfunction of certain electronic lamp ballasts. Thesetypes of power supplies are also disadvantageous because they require aminimum amount of current flow to function with the load in theon-state, and because it is difficult for a single design to accommodatea large range of load current levels. Active sensing requires power totransmit. A need therefore exists for an improved power supply foroccupancy sensors that does not require a minimum load but can provideenough power for an active motion sensor. A need also exits for a systemthat physically fits in the space allotted for a wall switch without thepower supply negatively affecting the motion sensor.

SUMMARY OF THE INVENTION

The present invention overcomes the disadvantages of existing occupancysensors and power supplies therefore and realizes a number ofadvantages. In accordance with the present invention, a method andapparatus are provided for supplying power to an occupancy-based loadcontroller. The method comprises the steps of: (1) applying power to acurrent limiting circuit, the current limiting circuit being configuredto limit leakage to ground current to a selected level; (2) accumulatingcharge in a capacitance circuit disposed at the output of the currentlimiting circuit; (3) selectively controlling discharge of thecapacitance circuit into a power rail for powering a load connectedbetween the power rail and ground; and (4) receiving a pulse signal. Theselectively controlling step comprises providing current discharged fromthe capacitance circuit to the power rail during a first portion of thepulse signal and interrupting the supply of current discharged from thecapacitance circuit to the power rail during a second portion of thepulse signal.

In accordance with another aspect of the present invention, the pulsesignal is periodic and comprises cycles each having the first portionand the second portion therein. The selectively controlling stepcomprises the step of switching current from the storage element on andoff with the occurrence of each of the first and second portions,respectively.

In accordance with yet another aspect of the present invention, themethod further comprises the step of operating an active occupancydetector configured to transmit occupancy detection signals at the samefrequency, and with a programmable substantially fixed delay to thefirst portion of the pulse signal.

In accordance with still yet another aspect of the present invention,the selectively controlling step comprises the step of switching currentfrom the storage element on and off with the occurrence of each of thefirst and second portions, respectively.

In accordance with the present invention, transfer of power to the powerrail is controlled using a processing device, and power is supplied tothe processing device via the power rail. A start up power circuit isconfigured to provide initial current to the processing device for startup until the processing device receives power via the power rail.

In accordance with an aspect of the present invention, a power supplyfor a load controller is provided that comprises a rectifier circuithaving a first input terminal connected to the hot terminal of an ACpower source, a second input terminal connected to one of ground andneutral, and a third output terminal and a fourth output terminalconnected to a DC high voltage rail and a DC return rail respectively.The power supply further comprises a current limit circuit connected tothe rectifier circuit and comprising a current limiting device and afirst capacitor. The current limiting device is configured to limit acorresponding one of the leakage current to ground and the leakagecurrent to neutral, to a selected level. The power supply also comprisesa regulator. The first capacitor is connected across the regulator, andthe regulator comprises a DC power input, a control input for receivinga pulse signal, an output comprising a DC power rail operable to providepower to a DC load when the DC load is connected with one terminalthereof to the DC power rail and another terminal thereof to a DCreturn. In addition, the regulator comprises a main switch and an energystorage device connected between the DC power input and the DC powerrail, and a control switch. The control switch controls operation of themain switch to be selectively opened and closed in accordance with thepulse signal. The energy storage device provides power to the DC powerrail when the main switch is open.

In accordance with another aspect of the present invention, the energystorage device is an inductor.

In accordance with yet another aspect of the present invention, thepulse signal is a periodic signal that comprises a first portion and asecond portion in each cycle thereof. The main switch is operable toclose and open in response to the first portion and the second portion,respectively. The main switch being closed and providing power to the DCpower rail substantially synchronously with operation of an occupancysensor for the load controller during the first portion of the pulsesignal. For example, wherein the occupancy sensor comprises anultrasonic sensor, the control second switch controls switching of themain switch in accordance with the pulse signal to reduce interferencewith the ultrasonic sensor.

In accordance with still yet another aspect of the present invention,the pulse signal is a periodic signal that repeats at the same frequencyas the sender transducer of the ultrasonic sensor

In accordance with still yet another aspect of the present invention,the first portion of the pulse signal is generated at a selected phasedifference with respect to operation of an occupancy sensor for the loadcontroller.

In accordance with another aspect of the present invention, the powersupply comprises a shunt regulator between the DC power rail and groundor DC return.

In accordance with yet another aspect of the present invention, thevoltage on the first capacitor is determined via the duty cycle of themain switch as controlled by the pulse signal.

In accordance with still yet another aspect of the present invention,the control switch is configured to receive a pulse signal generated viaa microcontroller, and the power supply is operable to power themicrocontroller when connected to the DC power rail.

In accordance with yet another aspect of the present invention, thepower supply further comprises a start up pulse generator circuitconnected to the regulator and configured to supply initialmicrocontroller current. A start up inhibit circuit can be connected tothe start up pulse generator circuit to prevent operation thereof oncethe pulse signal is generated by the microcontroller.

In accordance with still yet another aspect of the present invention,the regulator is a buck-type regulator.

In accordance with another aspect of the present invention, power supplyis operable to limit the leakage current to ground or leakage current toneutral to 0.50 milliamperes or less.

BRIEF DESCRIPTION OF THE DRAWINGS

For a more complete understanding of the invention and advantages ofcertain embodiments thereof, reference is now made to the followingdescription taken in conjunction with the accompanying drawings, whichform a part of this application and in which:

FIG. 1 is a front right side perspective view of a dual circuit wallswitch occupancy sensor device constructed in accordance with anembodiment of the present invention;

FIG. 2 is a exploded perspective view of the dual circuit wall switchoccupancy sensor device shown in FIG. 1;

FIG. 3 is a schematic diagram of a switching power supply circuitconstructed in accordance with an embodiment of the present invention;

FIGS. 4A and 4B are schematic diagrams of relay and relay controlcircuits constructed in accordance with an embodiment of the presentinvention;

FIGS. 5A, 5B, 5C and 5D are schematic diagrams of circuits forimplementing a microcontroller-based sensor board with dual technologysensing and user controls in accordance with an embodiment of thepresent invention;

FIG. 6 is a schematic diagram of a switching power supply circuitconstructed in accordance with another embodiment of the presentinvention;

FIG. 7 is a schematic diagram of zero-crossing detection circuitconstructed in accordance with an embodiment of the present invention;

FIG. 8 is a schematic diagram of an infrared sensor circuit constructedin accordance with an embodiment of the present invention;

FIGS. 9 and 10 are, respectively, schematic diagrams of ultrasoundtransceiver and receiver circuits constructed in accordance with anembodiment of the present invention; and

FIG. 11 is a graph illustrating a pulse signal generated at a selectedphase difference with respect to operation of an occupancy sensor.

Throughout the drawings, it should be understood that like referencenumbers refer to like features, structures and elements.

DETAILED DESCRIPTION OF THE EXEMPLARY EMBODIMENTS

FIGS. 1 and 2 depict a dual circuit wall switch occupancy sensor device10 in accordance with an embodiment of the present invention. The dualcircuit wall switch occupancy sensor device is used to automaticallycontrol at least two lighting circuits (hereinafter referred torespectively as “circuit A” and “circuit B”) based on detection of humanoccupancy in a room. A lighting circuit can comprise one or more lamps.As stated above in the background, a device configured to control morethan one lighting circuit in a room has the potential to reduce energyconsumption by controlling, for example, one of plural lighting circuitsthat is deployed near a window or door to remain off when naturallighting or ambient light conditions near the window or door issufficient for a user. It is to be understood, however, that the devicecan be configured to control more than two lighting circuits.

The device 10 preferably retrofits or mounts in an opening for aconventional electrical wall box such as that used for a conventionalmanual light switch. The device preferably operates from AC line voltageto directly switch the lighting loads. In the following description, adetailed description of known functions and configurations incorporatedherein has been omitted for conciseness. Exemplary automatic wallswitches having similar known functions and configurations are disclosedin U.S. Pat. Nos. 5,640,143, 5,986,357, 6,078,253 and 6,759,954, all toMyron et al (assigned to the same assignee as the present invention) andU.S. Pat. No. 5,189,393, to Hu, the disclosures of which are herebyincorporated herein by reference.

Physical Circuit Partition

With continued reference to FIG. 1 and the exploded diagram in FIG. 2,the mechanical and design aspects of the dual circuit wall switchoccupancy sensor device 10 are described in the above-referencedco-pending applications. Briefly, the device 10 comprises a housing 12with a face plate 14 and main body 16 that can be inserted into anopening in a wall or other surface configured to receive a conventionalwall switch for controlling a load (e.g., lighting). The face plate 14is configured to be essentially flush with the wall followinginstallation and comprises a grill 18 through which ultrasound signalscan be transmitted and received, as well as an aperture 20 for a lensused in connection with a passive infrared sensor, for occupancydetection using preferably US and PIR technologies. The face plate alsocomprises aperture 23 and 25 for two buttons 22 and 24 and theirrespective button covers 22′ and 24′ for manual control of each of thetwo lighting circuits.

With reference to FIG. 2, the device 10 has a number of board and plateassemblies that are arranged together in a housing with a face plate. Asensor board 26 implements the sensor circuitry for the US and PIRsensors, including sensor elements, analog sensor circuitry, andmicrocontroller 38. The sensor board 26 is mounted to the front of thewall switch, with ultrasonic and infrared transducers projecting forwardtoward the room, along with installer and user controls. The schematicdiagrams for the US and PIR sensors are provided in FIGS. 8, 9 and 10.

A power board 28 implements the power supply, and lighting loadswitching circuitry. The power board 28 is mounted toward the rear ofthe wall switch. The sensor and power boards 26 and 28 are connectedthrough a header (not shown). The sensor board 26 communicates relaycontrol signals and a power supply oscillator signal to the power board28. The power board 28 provides DC power and an AC voltage zero-crossingsignal to the sensor board 26. The schematic diagram for the power board28 is provided in FIG. 3, and the relays for load control of the twolighting circuits A and B are depicted in FIGS. 4A and 4B. The powersupply circuit 48 on the power board 28 employs a buck-type switchingregulator. In accordance with an aspect of the present invention, theswitching regulator is operated synchronously with the ultrasonicsender-detector circuit on the sensor board 26 to avoid creating energythat could possibly be detected erroneously as noise in ultrasonicreturn.

Finally, a cover plate 30 is provided between the face plate 14 and thesensor board 26 with apertures 36 and 37 for the two manual controlbuttons for controlling respective lighting circuits A and B, as well asapertures 33 and 35 for the US transducers 32, and the optical signalsfrom the lens 34.

IR Sensor

The infrared (IR) sensor circuit 40 on the sensor board 26 preferablycomprises a Fresnel lens 34, a pyroelectric detector, bandpassamplifiers, an analog-digital converter (ADC) (e.g., a ADC providedinside the microcontroller), and an IR sensor algorithm running on amicrocontroller 38 on the sensor board 26. The infrared sensor circuit40 is depicted in FIG. 8.

Ultrasonic Sensor

The ultrasonic (US) sensor circuit uses active Doppler ultrasonicdetection to sense motion in the controlled space. It consists of a 40KHz sender transducer or US transmitter circuit 42, and a US receivercircuit 44 comprising a 40 KHz receiver transducer and an amplifier, asynchronous sample-point mixer, a Doppler signal bandpass amplifier, aanalog-digital converter inside the microcontroller 38, and a US sensoralgorithm running on the microcontroller 38. The ultrasonic detectorcircuits 42 and 44 are depicted in FIGS. 9 and 10, respectively.

Photocell Sensor

A photocell circuit 46 is also provided on the sensor board 26 andpreferably comprises a cadmium-sulfide photo-resistor or otherlight-to-current translation device, biasing circuitry, ananalog-digital converter available inside the microcontroller 38, and aphotocell sensor algorithm running inside the microcontroller. Thephotocell circuit 46 is depicted in FIG. 7. The photocell algorithmimplements lighting circuit turn-off (e.g., of circuit B as shown in theillustrated embodiment) based on increased ambient light level, as wellas turn-on based on decreased light level, among other features and isdescribed in more detail below in connection with the dual circuit wallswitch occupancy sensor device 10 control algorithm.

Microcontroller

The microcontroller 38 is a digital microprocessor that preferablycomprises an analog-digital (A/D) input subsystem, and a pulse-widthmodulation (PWM) output subsystem, as well as general purposeinput/output (I/O) pins. For example, the microcontroller 38 can be amodel MSP430 available from Texas Instruments Incorporated, Dallas, Tex.As stated above, the microcontroller 38 is depicted in the sensor boardschematic provided in FIG. 5. The microcontroller performs occupancydetection algorithms based on sensor signals from the A/D input pins,and controls the relays through I/O pins. The microcontroller 38 alsodrives the ultrasonic transducers 32 and the power supply switch throughPWM outputs. As stated previously, the power supply switching regulator66 on the power board 28 is operated synchronously with the ultrasonicsender-detector circuit 42 to avoid creating energy that could possiblybe detected erroneously as noise in ultrasonic return. In each switchingcycle of the power supply switching regulator 66, the on-time of aswitch in the power supply regulator 66 is set by a pulse from themicrocontroller PWM subsystem. Accordingly, the switching cycle repeatsat a 40 kHz rate.

Power Supply

The power supply circuit 48 on the power board 28 is depicted in FIG. 3.The power supply circuit 48 derives its power input from the AC line,leaking a small amount of line voltage current to ground. Alternatively,a power supply circuit 48 can operate with current leaked to neutral.From an electrical standpoint, ground and neutral are equivalent interms of operating the power supply circuit; however, from a wiringstandpoint, power supply circuits employing leakage of current to groundand neutral, respectively, are implemented using different connectionpoints that will be apparent to one of ordinary skill in the art. Thisparasitic leakage current is constrained by safety concerns not toexceed 0.5 milliamperes (mA). The occupancy sensor subsystem (e.g.,sensor board circuits 40, 42 and 44) operates from 3.3V at a currentconsiderably greater than 0.5 mA. The power supply circuit 48 operatesas a switching power converter to transform a high voltage at lowcurrent to a low voltage at higher current, maintaining good efficiencythrough the transformation. The power supply circuit 48 is described inmore detail below in connection with the power schematic depicted inFIG. 3.

Relay Control

The device 10 preferably comprises two relays RL100 and RL101 as shownin FIGS. 4A and 4B (e.g., on the power board 28) for controlling,respectively, the two individual lighting circuits A and B. Thealgorithm for controlling operation of the individual relays isdescribed below in connection with the dual circuit wall switch controlalgorithm.

AC Zero-Crossing Sense

AC voltage zero-crossing is sensed and forwarded to the sensor board 26by the circuit 110 comprising diode D101 and resistors R124, R125 andR126 depicted in FIG. 7. Resistors R126 and R125 limit current for thezero voltage-crossing sense circuit. Diode pair D101 are addedprotection for the corresponding microcontroller pin. Resistor R124preferably weakly biases the pin to P-GND. The closures of relays RL100and RL101 (i.e., in FIGS. 4A and 4B) are timed based on the samples fromthe zero voltage-crossing sense circuit. Operation of the relay coildrive circuits, also shown in FIGS. 4A and 4B, will result in chargeloss from the relay storage capacitors C105 and C106, respectively. Thesensor board microcontroller 38 times the duration of, and time between,the relay pulses to maximize the switching time within the storagecapacitor constraints.

User Controls

A number of control buttons are accessible from the face plate or fascia14, as shown in FIGS. 1 and 2. These control buttons include, but arenot limited to, user pushbuttons 22 and 24 to manually turn on/offlighting circuit A (e.g., the lower button) and lighting circuit B(e.g., the upper button). These control buttons are preferably providedon the sensor board 26 and extend through corresponding apertures in thecover plate 30 and face plate 14 as described above.

In addition to face plate user controls, a number of hiddeninstaller/maintenance control buttons and/or switches are provided.These hidden installer/maintenance control buttons and switches areprovided, by way of an example, on the sensor board 26 and arepreferably accessible only after first removing the cover plate 30 andfascia or face plate 14. The hidden installer/maintenance controlbuttons and switches are preferably implemented as Mode Switches 52(e.g., 8 switches total) that include, but are not limited to:

A Mode: automatic or manual

B Mode: automatic or manual

Photocell Mode: continuous or turn-on only

Timer Setting: 2 switch poles

Timer Mode: fixed or automatic

Sensitivity: normal or high confidence

Reset Adapted Values

Pushbutton Switch-photocell setpoint

In addition, a maintenance mode switch 54 is provided (e.g., on thesensor board 26 as shown in FIG. 2) that defeats relay closure to complywith a UL requirement for automatic light switches. This safety disableswitch 54, as required by electrical code, puts the dual circuit wallswitch occupancy sensor device 10 in a maintenance cutoff mode andprevents either relay RL100 or RL101 from being energized. This disableswitch is preferably accessed only by an electrician, with the wallplate front cover or fascia removed. With reference to FIGS. 5A and 5D,the signals from the push buttons 22, 24 and 54 and the mode switches 52are provided as inputs to the microcontroller 38. FIG. 5B depicts ajumper for providing control signals such as the micropulse signal orrelay control signals (i.e., RLY_ON1, RLY_OFF1, RLY_ON2, and RLY_OFF2)for relays RL100 and RL101 to other parts of the device 10 such as thepower board 28. FIG. 5C depicts components for filtering the outputvoltage of the power supply circuit 48 for connection to the controlcircuit that controls the lighting circuits A and B via the relays RL100and RL101, as shown in FIGS. 4A and 4B, respectively.

The microcontroller 38 receives signals from these switches 52 and isprogrammed to operate in a selected manner corresponding to informationrelating to the states of the switches. A description of the controloperations of the microcontroller 38 and related circuits will now bediscussed.

For example, when the A Mode or B Mode switch is set to “auto” forautomatic operation, the corresponding circuit A or B operates in anAuto On mode whereby the device 10 turns lights on when occupancy isinitially detected (i.e., via operation of the US and/or PIR sensor).When the A Mode or B Mode switch is set to “manual” for manualoperation, the corresponding circuit A or B operates in an Manual On:mode whereby the device 10 does not switch lights on when occupancy isinitially detected. In other words, an occupant must manually turn thelights corresponding to circuit A or B on via the front platepushbuttons. Accordingly, the device 10 is configurable to operate in anAuto-On or a Manual-On mode for automatic-on or manual-on operation. Inautomatic-on mode, the device turns the lights on automatically upondetecting occupancy. The lights are automatically maintained on and thenturned off upon occupancy timeout. In manual-on mode, the occupant mustmanually turn on the lights upon entering the space, after which thelights are automatically maintained on and then turned off uponoccupancy timeout.

Regardless of the auto/manual switch settings for circuits A and B, themicrocontroller 38 is programmed to operate corresponding relays RL100and RL101 to close and thereby turn lights off when an occupancy timerhas expired. Thus, the device 10 implements an Auto Off mode as itsnormal behavior mode. A Manual Off mode is provided, however, whereby anoccupant may turn lights off using manual control (i.e., the front panelpushbuttons). Further, a Reversion to Auto-On operation is provided.After a user turns a lighting circuit A or B off manually via the frontpanel pushbuttons, the device 10 reverts to automatic-on mode after anoccupancy timer times out. This function allows a user to force lightsoff for particular circumstances regardless of the auto/manual switchsettings for circuits A and B. This functionality is achieved withoutthe need for any load current. Loads A and B may be disconnected withoutaffecting the operation of the unit. Active ultrasonic sensing is takingplace without load current.

With regard to photocell mode setting via a corresponding one of theswitches, the operation of the lighting circuit B can be affected by thedetected ambient light level either continuously or only for turn-onpurposes. In other words, unlike continuous mode operation whereby thecircuit B can be powered down if sufficient ambient light is detected,the turn-on only setting of the photocell control switch causes thecircuit B to be prevented from operating only if sufficient ambientlight is detected upon a turn-on operation.

The microcontroller 38 is programmed with an occupancy sensor algorithmthat adjusts the “confidence level” against which the sensor readingsare compared in order to determine occupancy. A gain setback ispreferably implemented to change between confidence levels required tokeep lights on versus those required to turn them on originally, asdescribed in the afore-mentioned U.S. Pat. No. 5,640,143. Accordingly,the US and PIR sensors in device 10 operate in accordance with a GainSet-Back with low sensitivity at initial turn-on, followed by highersensitivity after turn-on, to avoid false trips in an occupied space.The gain set-back takes advantage of the fact that a wall switchoccupancy sensor device will necessarily see a large occupancy signalwhen a person enters the room through the doorway. The sensitivity canthereafter be higher to detect smaller movements that can be typical ofoccupants who have occupied an area for some time (e.g., have beensitting relatively still to read and therefore may not be detected by anoccupancy sensor circuit with low sensitivity). The sensitivity switchcan be set to normal mode whereby the gain set-back is not employed orto a high confidence mode whereby the gain set-back is used.

The microcontroller 38 operates to turn off lighting circuits A and Bautomatically after no motion is detected for a selected time periodhereinafter referred to as a time out period. In addition, themicrocontroller 38 is programmed to operate the lighting circuits inaccordance with a grace period. After automatically turning lights off,the microcontroller 38 times a grace period (e.g., 10 seconds or so)during which it maintains an on-state sensitivity setting (i.e., ahigher confidence level). Thus, if a decision error was made and thelighting circuit(s) A and/or B were disabled erroneously (e.g., the areais still occupied), an occupant has the opportunity to wave his or herhand, for example, for occupancy detection purposes and make the device10 turn the lighting circuit(s) on again.

The time period can be a fixed duration or can be variable andautomatically adapted based on occupancy detection patterns. The timersetting switch permits a user to select initial time duration for thetime out period and the grace period. The timer mode (fixed/automatic)switch determines if the selected time out period will be of fixedduration (i.e., fixed timer mode) or will vary due to adaptive behaviorbased on detected occupancy (i.e., automatic timer mode).

Finally, the controls comprise a switch to reset adapted values such asthe time out period or occupancy sensor circuit confidence levels, and aswitch (e.g., a pushbutton switch) for the photocell setpoint.Adaptation procedures for these and other settings are described in moredetail below.

Operation of Lighting Circuits

The operation of the lighting circuits A and B will now be described inmore detail. In general, circuit A is the primary lighting circuit, andis therefore not daylight controlled. Circuit B preferably operates asan auxiliary lighting source when daylight is insufficient. Thus, asstated above, photocell control preferably affects only circuit B.

Turn-On

Turn-on operation of circuits A and B is set by a combination of the twoswitches 22 and 24 depicted on the face plate in FIG. 2, and the hiddeninstaller/maintenance control buttons 52 and 54 (e.g., implemented asmode switches 52) for circuit A auto/manual turn-on mode and circuit Bauto/manual turn-on mode. Table 1 describes the operation of thelighting circuits A and B in accordance with different combinations ofthese settings.

TABLE 1 Circuit B Turn-on Circuit A Turn-on Mode Mode Auto Manual Auto Aturns on with occupancy A must be turned on manually B turns on withoccupancy B turns on automatically if if low ambient light or lowambient light or photocell defeated photocell defeated Manual A turns onwith occupancy A must be turned on manually B must be turned on B mustbe turned on manually, manually, no photocell no photocell controlcontrol

Overrides

Either circuit A or B may be overridden from its automatic mode. Onceoverridden, if the switch 22 or 24 is toggled again, the circuit remainsin a manually-controlled condition. Pushbutton control of a circuitpreferably never causes that circuit to revert to automaticallycontrolled condition. Any manual override of an automatic settingpersists while the space is occupied. All manual control of circuits isreset to defaults after occupancy expires. In other words, if lights areturned off manually (i.e., using a front panel pushbutton), the lightsstay off as long as occupancy is still detected. The lights can beturned on again manually. If occupancy is detected during the time outperiod, the microcontroller 38 is programmed to start the time outperiod over again. After the time out and grace periods expire with nomotion detection and the lights turned off, the sensor returns toturn-on behavior guided by the mode switches, the photocell light levelsetting, and the measured light setting.

Photocell Behavior

A photocell circuit 46 can be defeated (e.g., for an as-shipped defaultmode) to operate as if sensing insufficient ambient light, causinglighting circuit B to turn on if not otherwise prevented by the circuitB mode switch. Photocell-controlled behavior at an event such as initialoccupancy sense is based on a pre-event lights-off illumination state.During occupancy, photocell-controlled behavior is preferably acontinuous function of light level, that is, circuit B turns on withinsufficient light and turns off when more than sufficient light exists.

Photocell behavior is preferably predictable based on a post-eventillumination state. Circuit B should not remain off when lightingcircuit A turns on automatically, and then turn on shortly thereafterdue to an initial over-estimation of light level with circuit A on. Inaddition, circuit B should not turn on with circuit A upon initialoccupancy detection, and then turn off shortly thereafter due to initialunder-estimation of light level with circuit A on. Most importantly,circuit B must not enter an oscillatory state due to under-estimation ofthe contribution of light by the circuit B circuit. The above-describedcontrol buttons allow for photocell control to prevent such undesirableoperation of lighting circuit B. For example, a photocell setpointswitch is provided. When the photocell setpoint button is pressed, thedual circuit wall switch occupancy sensor device 10 will switchindividual lighting circuits A and B on and off and determine photocelltrip points for the respective conditions of all off, circuit A on, andcircuits A and B on.

Certain situations will result in undesirable oscillatory behavior, asstated above, even for a system that is properly designed and installed.For instance, a change in local reflectance can cause more circuit Blighting to be reflected back toward the photocell, resulting incyclical oscillation. Also, occupants have historically complained aboutphotocell-controlled turn-off of their lights. The present inventionaddresses both of these issues by providing a mode setting that onlyallows the photocell to turn circuit B on and never off. If this mode isselected (e.g., the above-described switch setting for turn-on onlyphotocell mode), circuit B is only automatically turned off at the endof occupancy.

Turn-Off

Manually turning lighting circuit A off via the front panel pushbutton22 might cause the photocell control logic of the microcontroller todetermine that less light has been detected and turn circuit B on. Thiswould be frustrating, since the occupant evidently wants the lights off.Turning circuit A off means that the occupant wants the lights off, andtherefore overrides automatic turn-on of circuit B also in accordancewith the present invention. Manual control of circuit A with circuit Bin automatic mode switches between: (1) turning circuit A off andlocking circuit B in its current state; and (2) turning circuit A on andenabling circuit B to self-determine its state in accordance withoperational mode. Circuit A turns off: (1) when occupancy times out; or(2) when the circuit A front panel pushbutton is actuated. Circuit Bturns off: (1) when occupancy times out; or (2) when the circuit B frontpanel pushbutton is actuated; or (3) when ambient light goes above thesetpoint (i.e., unless photocell is in turn-on only mode).

In accordance with another aspect of the present invention, acascaded-off feature can be provided whereby circuit A turns off andcircuit B remains on if it is already on. In this case, circuit B, ifon, acts as a pilot as A turns off first.

Operation of Switching Power Supply

The power supply circuit 48 (FIG. 3) incorporates several uniquefeatures in accordance with the present invention. These feature arebriefly stated here, and further described below. These features are:

current limit to 0.5 mA for electrical safety according to groundleakage limit;

switching power supply control by the microcontroller 38 which itpowers;

start up circuit supplies initial microcontroller 38 current in order tostart the microcontroller;

switching power supply is synchronous with ultrasonic sensor;

output voltage regulation is done by a shunt regulator across the outputrail;

input voltage rail is determined by output voltage shunt, reflectedthrough power supply voltage division transfer function; and

power supply output current is determined by input current limit,reflected through power supply current multiplication transfer function.

As stated above, wall switch replacement sensors are required to besmall enough to fit into existing wall boxes. Although existing highfrequency power supplies have been successful in providing the requiredpower in small enough packages, they have not met another requirement ofthe small packaging, that is, noise reduction from sensor interference.In other words, when sensitive detector circuitry must exist veryphysically close to power supply components, power supply noise in thesensor signal path can result. The power board 28 of the presentinvention is advantageous because it uses a pulse that is synchronous(i.e., substantially simultaneous or characterized by an arbitrary fixedphase difference shown at 150 and 154 in FIG. 11) with the sensorultrasonic frequency to prevent noise from the power supply fromentering the signal path. The noise reduction achieved with synchronousoperation allows for greater sensitivity and signal clarity thanprevious sensors with non-synchronous power supplies.

A description of power supply circuit 48 operation will now be made withreference to FIG. 3 which depicts an exemplary power board schematic inaccordance with an embodiment of the present invention.

Filter and Safety

Filter 56 (i.e., inductor L101 and fusible resistor R102) separate thehot leg from the diode bridge rectifier 58 formed with diodes D107,D106, D108 and D105. The resulting LRC impedance dampens out any energyintroduced during the switching of the load (e.g., lighting circuit A orB). In filter 62 (i.e., capacitor C111) accumulates charge to reach thepeak voltage of the input AC line with reference to ground.

Current Limit

Resistors R129, R127, R131, R128, R103 and R104 with transistors Q110and Q109 make a current limit circuit 60 that only allows an average of0.5 mA to pass.

Start Up Pulse Generator

A start up pulse generator 68 comprises a capacitor C103 thataccumulates the charge allowed by the current limit circuit until itreaches approximately the Zener voltage of Zener diode D102. CapacitorC109 charges through the resistor R122 from capacitor C103.Alternatively, diode D102 may be omitted, and the resistor R122 may bereplaced with a series combination of a ˜138V Zener diode and, forexample, a 2K resistor. This alternate series combination circuitachieves a more rapid start up time, and the ˜138V Zener diode is notbiased above the Zener voltage during switcher operation (i.e.,operation of diac D109 and SCR D112). When the voltage across capacitorC109 reaches somewhere between 26 and 36 VDC, the diac D109 breaks overapproximately 10V and triggers SCR D112. The charge on C109 dumps intothe 3.3V positive rail of the device 10 and is limited by resistor R132.The shunt regulator D100 prevents the 3.3V rail from transitioning toohigh. This pulse of current sustains the 3.3V rail for a time longenough to bring the sensor board microcontroller 38 out of reset modeand into stable operation.

Alternatively, resister R122 may be replaced with a switch such as aMOSFET switch 112, as shown in FIG. 6, in accordance with anotherembodiment of the power supply circuit 48′ that is substantially thesame as the power supply circuit in FIG. 3, except for the use of theMOSFET switch 112 and related components indicated at 114 and a start uppulse generator circuit 68′ without the resister R122. When the voltageon capacitor C103 is at or above the Zener voltage, the MOSTFET switch112 conducts, and capacitor C109 is charged. When the switchingconverter operates, the voltage on capacitor C103 will drop below theZener voltage, and the switch will turn off. This configurationeliminates the need for a start up recycle inhibit circuit 70 describedbelow, and also allows for quicker charging of capacitor C109.

Buck Regulator

Following microcontroller start up, the sensor board 26 outputs a pulsesignal (e.g., via a P-Micro-Pulse signal on Pin 4 of the header J100 inFIG. 3). This is preferably a periodic signal of a 0.5 microsecond pulseof 3.3V followed by 24.5 microseconds of zero Volts (154 in FIG. 11).This pulse signal drives switch Q100 on in a buck regulator 66, therebyturning on a main switch Q111 through transformer Q112 and resistor R141When the pulse signal (i.e., on Pin 4) returns to 0V, the switch Q100turns off, and transformer Q112 flies back through diode D111 and diodeD104, quickly turning off switch Q111. When switch Q111 is on, currentflows from capacitor C103 through resistors R138, resistor R101 andswitch Q111, and inductor L100 into the 3.3V rail, storing energy ininductor L100. When switch Q111 is off, current flows through diode D103and inductor L100 into the 3.3V rail until the inductor L100 hasdepleted all of its stored energy. The ratio of on time to off time ofthe main switch Q111 sets the ratio of the voltage on capacitor C103 tothe 3.3V rail. Since the 3.3V rail is clamped by shunt regulator 72(i.e., D100), the duty cycle of main switch Q111 determines the voltageon capacitor C103 as long as current out of capacitor C103 is less thanthat set by the current limit circuit 60.

Start Up Recycle Inhibit

When pin 4 is providing pulses to the power board 28, some of the pulseenergy is accumulated on capacitor C110 of a start up recycle inhibitcircuit 70. This potential turns on switch U101, which drains capacitorC109 below the breakover voltage of diac D109. This prevents the startup circuit from operating while the pulse signal is present on pin 4.

The output 3.3V shunt and the switch duty cycle determine the voltage oncapacitor C103. The start up pulse generator circuit 68 mayautomatically disable below a threshold voltage above the voltageplanned for operation by the switch duty cycle. For example, considerthe case if the lowest expected peak input voltage is120V*0.9*1.414˜152V. If an operating voltage for capacitor C103 isselected below this value, it may be used to enable or disable the startup pulse generator circuit 68. Selecting the capacitor C103 voltage at˜140V, for example, allows the use of available wide tolerance parts,while still providing start up for low line input. If the C103 voltagedrops below the nominal 148V, the start up pulse generator circuit 68 isdisabled.

US Circuit Operation

US circuit operation will now be described with reference to FIGS. 9 and10 FIG. 9 is a schematic of an exemplary US transmitter circuit 42. FIG.10 is a schematic of an exemplary US receiver circuit 44.

The US transmitter circuit 42 provides a square wave input (150 in FIG.11) to ultrasonic transducers 32 (FIG. 2) that is preferablysynchronized with the power supply circuit 48 to operate substantiallysimultaneously or with an arbitrary fixed phase difference. Withreference to FIG. 9, the microcontroller 38 on the sensor board 26operates switch Q7 to output an arbitrary pulse signal (e.g., a periodicsignal of 12.5 microsecond pulse of 3.3V followed by 12.5 microsecondsof zero Volts). This controls SAMPLE_OUT (152 in FIG. 11) which providesthe demodulation pulse synchronously with US transmitter circuit 42. Asdescribed above in connection power supply operation, power supplyswitching (154 in FIG. 11) is substantially synchronous with the UStransmitter circuit 42. In addition to facilitating generation of atransmitted US signal (i.e., SAMPLE_PULSE_OUT), the US transmitter (150in FIG. 11) circuit 42 provides a sampling point signal (i.e.,SAMPLE_OUT), as indicated in FIG. 9.

With reference to FIG. 10, the US receiver circuit 44 comprises avariable gain op amp circuit 80, sampling point/demodulating circuitindicated generally at 82, three RC circuits 84, 86, 88, an op ampbuffer circuit 90 and a two stage op amp circuit 92. The inputs toultrasonic receiver circuit 44 are the Doppler-shifted analog ultrasonicreceiver signal (i.e., SAMPLE_PULSE_IN) and a digital sampling pointsignal (i.e., SAMPLE_OUT). The outputs of ultrasonic receiver circuit 44are the demodulated, filtered analog ultrasonic receiver signal (i.e.,US_SIGNAL) and an analog ultrasonic sampling point signal (i.e.,SAMPLE_IN) that is provided to the microcontroller 38.

Variable gain op amp circuit 80 is an ultrasonic receiver preamplifiercircuit. The input to this circuit is the modulated analog ultrasonicreceiver signal (i.e., SAMPLE_PULSE_IN). The output of this circuit isan amplified, modulated analog ultrasonic receiver signal. Circuit 80uses diodes D6 in the negative feedback path to switch in parallel witha resistor R48, thus decreasing the overall gain for large signalexcursions, and preventing hard-limiting of the amplifier in the eventof excessive continuous wave receiver signals. The resulting nonlineartransfer characteristic is advantageous when the sensor is installed ina confined space where wall reflections cause a large amount of acousticenergy to be directed into the ultrasonic receiver. It also provides amore gradually sloped decision surface for sample point optimization.

The inputs to the sampling point/demodulating circuit 82 are theamplified modulated analog ultrasonic receiver signal from the variablegain op amp circuit 80 and the analog sampling point signal (i.e.,SAMPLE_IN). The output of circuit 82 is the demodulated Doppler-shiftedanalog ultrasonic receiver signal. The sampling point/demodulatingcircuit 82 varies the position (or phase) of the sampling point on theultrasonic receiver waveform under control of the microcontroller 38,which produces the pulse signal (152 in FIG. 11), to prevent the loss ofmotion information due to large signal levels. For optimum sensitivity,the synchronous sample point on the ultrasonic receiver waveform shouldlie as close to the zero-crossing as possible.

RC circuit 84 is an envelope detector circuit. The input to RC circuit84 is the Doppler-shifted analog ultrasonic receiver signal. The outputof RC circuit 84 is the filtered, demodulated Doppler-shifted analogultrasonic receiver signal. RC circuit 84 acts as an envelope detectorand filters out the demodulation switching transients while preservingthe demodulated signal information.

Op amp buffer circuit 90 serves to increase the drive capability of thesynchronous demodulator circuit 82. The input to circuit 90 is thefiltered, demodulated Doppler-shifted analog ultrasonic receiver signal.The output of circuit 708 is the increased drive, filtered, demodulatedDoppler-shifted analog ultrasonic receiver signal.

RC circuit 86 is a low pass filter circuit. The input to RC circuit 86is the increased drive, filtered, demodulated Doppler-shifted analogultrasonic receiver signal. The output of RC circuit 86 is the increaseddrive, low pass filtered, demodulated Doppler-shifted analog ultrasonicreceiver signal. The output of circuit 90 is low pass filtered to removecontributions due to motion in the environment, leaving a DC signal thatrepresents the receiver carrier amplitude at the ultrasonic samplepoint. This signal is sampled by the digital microcontroller 38 throughsignal 94 to yield the analog ultrasonic sampling point (152 in FIG. 11)signal.

Two stage op amp circuit 92 is a bandpass filter circuit. The input tocircuit 92 is the increased drive, filtered, demodulated Doppler-shiftedanalog ultrasonic receiver signal. The output of circuit 92 is theincreased drive, bandpass filtered, demodulated Doppler-shifted analogultrasonic receiver signal. The pass band of circuit 92 is designed topass the Doppler-shifted signal for motions of interest.

RC circuit 88 is an anti-aliasing filter circuit. The input to RCcircuit 88 is the increased drive, bandpass filtered, demodulatedDoppler-shifted analog ultrasonic receiver signal. The output of RCcircuit 88 is the anti-aliased, increased drive, bandpass filtered,demodulated Doppler-shifted analog ultrasonic receiver signal. Theoutput signal 98 is sampled by the digital microcontroller 38 A/Dcircuitry and processed using digital signal processing techniques.

PIR Circuit Operation

An exemplary embodiment of the infrared sensor circuit 40 is shown inFIG. 8 and comprises a dual element pyroelectric infrared motion sensorcircuit. The input to infrared sensor circuit 40 is infraredelectromagnetic radiation. The output of infrared sensor circuit 40 isan electrical signal indicative of motion.

An exemplary embodiment of the infrared circuit 40 is shown in FIG. 8and comprises two cascaded op amp bandpass circuits 100, 102. The input104 to infrared circuit 40 is the electrical PIR sensor signalindicative of motion. The output 106 of infrared circuit 40 is abandpass filtered infrared sensor signal indicative of motion. Theoutput signal 106 of this circuit is sampled by A/D circuitry within thedigital microcontroller 38 and processed using digital signal processingtechniques.

Adaptation

Designing and tuning sensor adaptation takes a long time, largelybecause the adaptation time constants extend through several weeks. Thedual circuit wall switch occupancy sensor device 10 of the presentinvention preferably employs adaptation algorithms such as thosedescribed in U.S. Pat. Nos. 5,986,357, 6,078,253 and 6,759,954, all toMyron et al (assigned to the same assignee as the present invention),which are believed to be robust in general.

While the invention has been shown and described with reference tocertain embodiments thereof, it should be understood by those skilled inthe art that various changes in form and details may be made thereinwithout departing from the spirit and scope of the invention as definedby the appended claims.

1. A method of supplying power to an occupancy-based load controllercomprising the steps of: applying power to a current limiting circuit,the current limiting circuit being configured to limit one of leakage toground current and leakage to neutral current to a selected level;accumulating charge in a capacitance circuit disposed at the output ofthe current limiting circuit; selectively controlling discharge of thecapacitance circuit into a power rail for powering a load connectedbetween the power rail and ground; and receiving a pulse signal; whereinsaid selectively controlling step comprises providing current dischargedfrom the capacitance circuit to the power rail during a first portion ofthe pulse signal and interrupting the supply of current discharged fromthe capacitance circuit to the power rail during a second portion of thepulse signal.